#include "WinMain.h"
#include "Renderer.h"
#include "Model.h"
#include "Sprite.h"

int main(int iArgCount, char* pCmdLine[])
{
	bool bFullScreen = false;
	int width = 800;
	int height = 600;
	int bpp = 32;
	char* title = "Render Window";

	Model model;
	model.SetX(0.f);
	model.SetY(0.f);
	model.SetWidth(40.f / width);
	model.SetHeight(40.f / height);

	Sprite sprite(model);

	Renderer* pWnd = Renderer::GetInstance();

	pWnd->SetWindow(title, width, height, bpp, bFullScreen);

	pWnd->AddSprite(&sprite);

	while(pWnd->IsOpen())
	{
		Event e;
		while(pWnd->GetEvent(&e))
		{
			if(e.Type == Event::EventType::Mouse)
			{
				model.SetX((float)e.MouseX / width);
				model.SetY((float)e.MouseY / height);
			}
		}

		pWnd->DrawScene();
	}

	delete pWnd;
	pWnd = 0;

	return 0;
}